import { useEffect, useState } from 'react';
import Title from '../component/Title';
import './index.less';
import banner from '@/config/img/banner1.png';
import { MoreData, objData } from './index.config';

const literatureWork = (props: any) => {
  console.log(1111, props);
  const [newObj, setNewObj] = useState<any>({});
  const params: any = props.location.query.id;
  useEffect(() => {
    if (params) setNewObj(objData?.[params]);
  }, [params]);
  return (
    <div className="actor-work">
      <div className="banner">
        <img src={banner} alt="" />
      </div>
      <div className="work-content">
        <Title
          title={'著名雷剧演员'}
          enTitle={'LeiJu screenplay'}
          className={'actors'}
        ></Title>
        <div className="hand-item">
          <div className="actor-item">
            <div className="top">
              <div className="name">{newObj.title}</div>
              <div className="time">{newObj.time}</div>
            </div>
            <img src={newObj.src} alt="" />
            <div className="works">{newObj.works}</div>
            <div className="desc">{newObj.desc}</div>
          </div>
          <div className="item-details">
            <div className="item-details-content">{newObj.details}</div>
          </div>
        </div>
      </div>
    </div>
  );
};
export default literatureWork;
